/*  This file is part of Real Time Digital Audio Processing library.
 *  Copyright (C) 2008 - Emilio Monti - emilmont@gmail.com
 *
 *  Real Time Digital Audio Processing library is free software: you can
 *  redistribute it and/or modify it under the terms of the GNU General
 *  Public License as published by the Free Software Foundation, either
 *  version 2 of the License, or (at your option) any later version.
 *
 *  Real Time Digital Audio Processing library is distributed in the hope
 *  that it will be useful, but WITHOUT ANY WARRANTY; without even the
 *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *  See the GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Real Time Audio Processing library.
 *  If not, see <http://www.gnu.org/licenses/>.
 */
#ifndef GENERATE_H_
#define GENERATE_H_

#include "Module.h"

class Table {
	public:
        Table(unsigned int length);
        float* data;
        unsigned int    length;
        unsigned int    phase;
        virtual ~Table();
};

class Sine : public Module {
    public:
        /**
         * Generate a sine wave (LUT implementation)
         *
         * @param sampleRate
         *             The signal sample rate
         *
         * @param amp
         *             The amplitude of the generated sine wave
         *
         * @param freq
         *             The frequency of the generated sine wave
         **/
        Sine(unsigned int sampleRate, float amp, unsigned int freq);
        void processSignal(float* signal, unsigned long length);
        virtual ~Sine();
    private:
        Table* table;
};

#endif /*GENERATE_H_*/
